package com.gc.server.controller.api;

import com.gc.server.entity.LinkHeadEntity;
import com.gc.server.entity.ShopEntity;
import com.gc.server.entity.UserEntity;
import com.gc.server.service.LinkHeadService;
import com.gc.server.service.ShopService;
import com.gc.server.service.UserShopService;
import com.yf.annotation.IgnoreAuth;
import com.yf.annotation.LoginUserId;
import com.yf.response.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/api/head")
public class ApiHeadController {

    @Autowired
    private LinkHeadService headService;

    /**
     * 某人总部列表
     * @param userId
     * @return
     */
    @GetMapping("/list/user")
    public R listByUserId(@LoginUserId Long userId){
        List<LinkHeadEntity> list = headService.findByUserId(userId);
        return R.ok(list);
    }



}
